package com.object.module.lq.sys.controller;

import com.object.module.lq.sys.entity.TRolePermissionEntity;
import com.object.module.lq.sys.service.TRolePermissionService;
import com.object.utils.Q;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @作者：小庆 🌤
 * @date: 2022/7/3
 * @email:1578442339@qq.com *   权限授别 授权
 */
@RestController
@RequestMapping("/role/permission")
public class TRolePermissionController {
    @Autowired
    private TRolePermissionService tRolePermissionService;

    @GetMapping("/info/urId")
    public Q infoUrId(@PathVariable("urId") Integer urId) {
        return tRolePermissionService.infoUrId(urId);
    }

    @PostMapping("/save")
    public Q saveRolePermission(@RequestBody List<TRolePermissionEntity> permissionList) {
        return tRolePermissionService.saveRolePermission(permissionList);
    }
}
